<html>
<input type="button" value="Test" onClick="test()"/>

<script type="text/javascript">
    function test(){
        alert("test");
    }
    console.log("user_client.js called!");
    document.addEventListener('WebViewJavascriptBridgeReady'
    , function(event) {
        var bridge=event.bridge;
        bridge.init(function(message, responseCallback) {
             if (responseCallback) {
             responseCallback("Right back atcha") ;
             }
        }) ;
        bridge.send('Hello from the javascript');
        bridge.send('Please respond to this', function(responseData) {
            console.log("Javascript got its response "+ responseData);
        });
        bridge.registerHandler("showAlert", function(data) { console.log("alert:"+data); });
        bridge.callHandler("native_GetBaseInfo","gift for handler1",function(responseData){
            console.log("native_getversion response:"+responseData);
            alert(responseData)
        });
    }, false)
</script>
</html>